home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / wordproc / raved110.arj / REPROF.MAC < prev   
Text File  |  1993-08-12  |  6KB  |  136 lines

  1. Ravitz Editor - useful patches and macros
  2.  
  3.   autoscroll cursor with command recall cursor up, down and disable alt-y
  4.   rotating permanent panels
  5.   record and playback keystrokes
  6.   move marked area
  7.   box the perimeter of the area mark
  8.   delete blank lines in the area mark
  9.   load multiple files on startup
  10.   tab functions that insert or delete spaces in insert mode
  11.  
  12. * autoscroll cursor with command recall cursor up, down and disable alt-y ******
  13.   * This setup sets autoscroll cursor movement for the text area. For the
  14.   * command line the up and down cursor keys recall commands foward and
  15.   * backward. Alt-y is disabled. Use esc to switch the cursor area.
  16.   W @a-y &noop
  17.   W @csrlf &csrlf
  18.   W @csrrt &csrrt
  19.   W @csrup ¯o(10)
  20.   W @csrdn ¯o(11)
  21.   X 10 ^ifcsrcmdln ^recallcmdfor ^ifcsrtxt ^csrup
  22.   X 11 ^ifcsrcmdln ^recallcmdbk  ^ifcsrtxt ^csrdn
  23.  
  24. * rotating permanent panels ****************************************************
  25.   * This  macro rotates between a number of permanent panels and compensates for
  26.   * any size panel. Two numbers need to be set as noted in the comments.
  27.   x *
  28.   y ^inhibitscrn ^savecsrps ^csrcmdln
  29.   y ^varset(1) ^bytepatch @permpanel
  30.   y ^varadd(1) 1
  31.   y ^if<> ^var(1) 9 ^jumpfor(3) ^varset(1) 0     // * 9 is last panel + 1
  32.   y ^if<> ^var(1) 1 ^jumpfor(3) ^varset(1) 3     // * 3 is first panel
  33.   y ^varset(0) ^scrnsplit ^if<>0 ^var(0) ^unsplitscrn
  34.   y ^patchbyte @permpanel ^var(1) ^updatescrninh
  35.   y ^if=0 ^var(0) ^jumpfor(4) ^varadd(0) ^splitscrn(2) ^execfcn
  36.   y ^rescsrps ^updatescrn
  37.  
  38. * record and playback keystrokes ***********************************************
  39.   * These macros lets you record up to 40 keystrokes and play them back by
  40.   * pressing Ctrl-P. Ctrl-R starts and ends the recording. Shift mode r is
  41.   * displayed during recording. If a keystroke invokes a function that gets more
  42.   * keystrokes, then these are not recorded - you can record a key that displays
  43.   * a menu, but the menu selection is not recorded. If one of the keystrokes
  44.   * invokes a macro that turns the display off and assumes it will be turned on
  45.   * when the macro is finished, it will not be turned on when the macro is
  46.   * called from a macro. This may give unexpected results.
  47.   m 46 ^error Keystroke limit exceeded
  48.   w @c-r ¯o(1)
  49.   w @c-p ¯o(2)
  50.   x 1
  51.   y ^varset(1) ^@mac 2 ^varset(2) ^var(1) ^varadd(2) 80 ^setshiftmd(18)
  52.   y ^label(1)
  53.   y ^if< ^var(1) ^var(2) ^jumpfor(3) ^setshiftmd(0) &dispmsg(46)
  54.   y ^getkeyns
  55.   y ^if<> ^var(0) ^macro(*) ^jumpfor(3) ^setshiftmd(0) ^endmacro
  56.   y ^patchwords(2) ^var(1) ^var(0) ^endmacro ^varadd(1) 2
  57.   y ^execfcn
  58.   y ^jumpbklb(1)
  59.   X 2
  60.   Y ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop
  61.   Y ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop
  62.   Y ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop
  63.   Y ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop
  64.  
  65. * move marked area *************************************************************
  66.   * This macro moves the area mark with its contents to the cursor location. The
  67.   * cursor may be anywhere except the command line. The are you sure prompt for
  68.   * data lost past column 255 is not given. Ignore excluded lines mode is
  69.   * respected. The area mark is buffered in a temporary file, so more space is
  70.   * needed than for a normal overlay.
  71.   x *
  72.   y ^savecsrps
  73.   y ^if= ^armkmd ^sp &dispmsg(12) ^ifcsrcmdln &dispmsg(16)
  74.   y ^ifnoteditable &dispmsg(16)
  75.   y ^inhibitscrn
  76.   y ^varset(15) ^bytepatch @edcurfl ^patchbyte @edcurfl ^no
  77.   y ^csrcmdln ^eraseendln e ^execcmdnorecall
  78.   y ^patchbyte @edcurfl ^var(15)
  79.   y ^ifnotsuccess ^jumpforlb(2)
  80.   y ^csrtxt ^resexmd ^overlayar ^ifnotsuccess ^jumpforlb(1)
  81.   y ^resexmd ^blankarnsc ^movearmk
  82.   y ^prevses ^csrtxt ^suppressays &overlayar ^movearmk
  83.   y ^nextses ^csrcmdln q ^suppressays ^execcmdnorecall ^endmacro
  84.   y ^label(1) ^csrcmdln q ^suppressays ^execcmdnorecall ^csrtxt &dispmsg(5)
  85.   y ^label(2) ^eraseendln ^csrtxt &dispmsg(5)
  86.  
  87. * box the perimeter of the area mark *******************************************
  88.   x *
  89.   y ^if= ^armkmd ^sp &dispmsg(12) ^if<> ^armknotonscrn 0 &dispmsg(18) ^gotoarmk
  90.   y ^setdrawingmdsl ^if= ^curcol ^armkcol2 ^jumpfor(4) ^keyfcn @csrrt ^jumpbk(6)
  91.   y ^keyfcn @csrdn ^if<> ^inarmk 0 ^jumpbk(5) ^setdrawingmdoff ^csrup
  92.   y ^setdrawingmdsl ^if= ^curcol ^armkcol1 ^jumpfor(4) ^keyfcn @csrlf ^jumpbk(6)
  93.   y ^keyfcn @csrup ^if<> ^inarmk 0 ^jumpbk(5) ^setdrawingmdoff ^csrdn
  94.   y ^if= ^curcol ^armkcol2 ^endmacro // * this is for one column wide marks
  95.   y ^setdrawingmdsl ^keyfcn @csrrt ^setdrawingmdoff ^csrlf(1) ^csrcmdln ^csrtxt
  96.  
  97. * delete blank lines in the area mark ******************************************
  98.   x *
  99.   y ^if= ^armkmd ^sp &dispmsg(12) ^if<> ^armknotonscrn 0 &dispmsg(18) ^gotoarmk
  100.   y ^label(1)
  101.   y ^if<> ^currow ^scrnheight ^jumpfor(2) ^scrolldn1pg
  102.   y ^if=0 ^inarmk ^endmacro
  103.   y ^iflnexcluded ^reshow
  104.   y ^iflnnotblank ^jumpfor(3)
  105.   y ^delln ^jumpbklb(1) ^csrdn ^jumpbklb(1)
  106.  
  107. * load multiple files on startup ***********************************************
  108.   * This is a startup macro that loads multiple files into RE from the command
  109.   * line. It is not perfect, but should work in most cases.
  110.   m 46 ^error Files not loaded
  111.   x 0
  112.   y ^if<> ^msgnum 29 ^endmacro ^csrlf ^inhibitscrn
  113.   y ^csrtxt ^overlaycmd ^delchar(2) ^mkln ^flowlist ^topoffile ^varset(0) 0
  114.   y ^label(1)
  115.   y   ^iflntopbot ^jumpforlb(2)
  116.   y   ^setpsmk ^wordcmdln ^csrcmdln ^insmd e ^sp ^updatescrn ^inhibitscrn
  117.   y   ^gotopsmk ^prevses ^execcmd
  118.   y   ^ifsuccess ^jumpfor(6) ^gotopsmk ^csrdn ^varset(0) 1 ^jumpbklb(1)
  119.   y   ^gotopsmk ^gotopsmk ^delln ^jumpbklb(1)
  120.   y ^label(2)
  121.   y ^unsetpsmk ^csrcmdln ^blankln ^csrstartln ^clrchgd
  122.   y ^if= ^var(0) 1 ^jumpfor(5) q ^execcmdnorecall ^nextses ^endmacro
  123.   y ^dispmsg(46)
  124.  
  125. * tab functions that insert or delete spaces in insert mode ********************
  126.   * tab function
  127.   x *
  128.   y ^ifinsmd ^jumpfor(3) ^tabcurset ^endmacro
  129.   y ^varset(1) ^curcol ^tabcurset ^varset(2) ^curcol ^csrcolx ^var(1)
  130.   y ^sp ^if< ^curcol ^var(2) ^jumpbk(4)
  131.   * back tab function
  132.   x *
  133.   y ^ifinsmd ^jumpfor(3) ^tabbkcurset ^endmacro
  134.   y ^varset(1) ^curcol ^tabbkcurset ^varset(2) ^curcol ^csrcolx ^var(1)
  135.   y ^bksp ^if> ^curcol ^var(2) ^jumpbk(4)
  136.